/**
*      author: Y_Yao
*      created: 2025-02-25 23:33:47
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int M = 1e5 + 7;
int dp[M];
int a[10 + 5],b[M];
int m,n;

void solve()
{
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i];
    }
    cin >> m;
    for(int i = 1;i <= m;i++)
    {
        cin >> b[i];
        dp[b[i]] = -1;
    }
    int x;
    cin >> x;

    dp[0] = 1;
    for(int i = 1;i <= M;i++)
    {
        if(dp[i] == -1) continue;
        for(int j = 1;j <= n;j++)
        {
            if(i - a[j] >= 0 && dp[i - a[j]] == 1)
            {
                dp[i] = 1;
            }
        }
    }

    if(dp[x] == 1) cout << "Yes" << endl;
    else cout << "No" << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}